@extends('system.frame_layout')
<?php $parent_menu = "主页"; $menu_selected = "我的主页";?>

@section('content')
    <div id="content-panel">
        <div class="row">
            <div class="col-xs-12">

                <!-- 顶部四个钱包 -->
                <div class="row">
                    <div class="col-md-3">
                        <!-- BEGIN WIDGET THUMB -->
                        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
                            <h4 class="widget-thumb-heading">奖金币钱包</h4>
                            <div class="widget-thumb-wrap">
                                <i class="widget-thumb-icon bg-green iconfont icon-jiangjin"></i>
                                <div class="widget-thumb-body">
                                    <span class="widget-thumb-subtitle">RMB</span>
                                    <span class="widget-thumb-body-stat">
                                        {{$user->wallet->w1}}
                                    </span>
                                </div>
                            </div>
                        </div>
                        <!-- END WIDGET THUMB -->
                    </div>
                    <div class="col-md-3">
                        <!-- BEGIN WIDGET THUMB -->
                        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
                            <h4 class="widget-thumb-heading">报单币钱包</h4>
                            <div class="widget-thumb-wrap">
                                <i class="widget-thumb-icon bg-red iconfont icon-jihuo"></i>
                                <div class="widget-thumb-body">
                                    <span class="widget-thumb-subtitle">RMB</span>
                                    <span class="widget-thumb-body-stat">
                                        {{$user->wallet->w2}}
                                    </span>
                                </div>
                            </div>
                        </div>
                        <!-- END WIDGET THUMB -->
                    </div>
                    <div class="col-md-3">
                        <!-- BEGIN WIDGET THUMB -->
                        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
                            <h4 class="widget-thumb-heading">A 区总业绩</h4>
                            <div class="widget-thumb-wrap">
                                <i class="widget-thumb-icon bg-purple iconfont icon-Performance"></i>
                                <div class="widget-thumb-body">
                                    <span class="widget-thumb-subtitle">RMB</span>
                                    <span class="widget-thumb-body-stat">{{$user->score->a_count}}</span>
                                </div>
                            </div>
                        </div>
                        <!-- END WIDGET THUMB -->
                    </div>
                    <div class="col-md-3">
                        <!-- BEGIN WIDGET THUMB -->
                        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
                            <h4 class="widget-thumb-heading">B 区总业绩</h4>
                            <div class="widget-thumb-wrap">
                                <i class="widget-thumb-icon bg-blue iconfont icon-Performance"></i>
                                <div class="widget-thumb-body">
                                    <span class="widget-thumb-subtitle">RMB</span>
                                    <span class="widget-thumb-body-stat">{{$user->score->b_count}}</span>
                                </div>
                            </div>
                        </div>
                        <!-- END WIDGET THUMB -->
                    </div>
                </div>


                <div class="row">
                    <!-- 我的个人信息 -->
                    <div class="col-md-6 col-sm-6">
                        <div class="portlet light border">
                            <div class="portlet-title tabbable-line">
                                <div class="caption">
                                    <i class=" icon-social-twitter font-dark hide"></i>
                                    <span class="caption-subject font-dark bold uppercase">我 的 基 本 信 息 My basic information</span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <div class="tab-content">
                                    <div class="tab-pane active">
                                        <div class="table-scrollable table-scrollable-borderless">
                                            <table class="table table-hover table-light">
                                                <thead>
                                                <tr>
                                                    <th>Information Name 信息名称</th>
                                                    <th>Member Data 会员数据</th>
                                                </tr>
                                                </thead>
                                                <tr>
                                                    <td>
                                                        <a href="javascript:;" class="primary-link">UserName 会员名称</a>
                                                    </td>
                                                    <td>
                                                        <span class="bold theme-font">{{$user->username}}</span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <a href="javascript:;" class="primary-link">Membership level
                                                            会员级别</a>
                                                    </td>
                                                    <td>
                                                        <span class="bold theme-font">
                                                            {{uVipStr($user->vip)}}
                                                            @if($user->bdzx_status == \App\Models\MUser::$BDZX_YES)
                                                                报单中心
                                                            @endif
                                                        </span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <a href="javascript:;" class="primary-link">
                                                            Recommended number 推荐人数</a>
                                                    </td>
                                                    <td>
                                                        <span class="bold theme-font">{{$user->child_num}}人</span>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <a href="javascript:;" class="primary-link">Number of
                                                            activations 直接报单人数</a>
                                                    </td>
                                                    <td>
                                                        <span class="bold theme-font">
                                                            {{\App\Utils\TreeUtil::getBdUsersByUser($user)->count()}}
                                                            人
                                                        </span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 系统最新公告 -->
                    <div class="col-md-6 col-sm-6">
                        <div class="portlet light border">
                            <div class="portlet-title tabbable-line">
                                <div class="caption">
                                    <i class=" icon-social-twitter font-dark hide"></i>
                                    <span class="caption-subject font-dark bold uppercase">最 新 系 统 公 告 System Notification</span>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <div class="tab-content">
                                    <div class="tab-pane active">
                                        <!-- BEGIN: Actions -->
                                        @foreach($notices as $notice)
                                            <div class="mt-actions">
                                                <div class="mt-action">
                                                    <div class="mt-action-body">
                                                        <div class="mt-action-row">
                                                            <div class="mt-action-info ">
                                                                <div class="mt-action-icon ">
                                                                    <i class="iconfont icon-gonggao"></i>
                                                                </div>
                                                                <div class="mt-action-details ">
                                                                    <span class="mt-action-author">{{$notice->title}}</span>
                                                                    <p class="mt-action-desc">点击右侧阅读按钮，可查看公告详情！</p>
                                                                </div>
                                                            </div>
                                                            <div class="mt-action-datetime ">
                                                                <span class="mt-action-date">{{date('Y-m-d',$notice->time)}}</span>
                                                                <span class="mt-action-dot bg-green"></span>
                                                                <span class="mt=action-time">{{date('H:i',$notice->time)}}</span>
                                                            </div>
                                                            <div class="mt-action-buttons">
                                                                <button type="button"
                                                                        onclick="contentDlg(1, {{$notice->id}})"
                                                                        class="btn btn-outline green btn-sm">
                                                                    阅读
                                                                </button>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                    @endforeach
                                    <!-- END: Actions -->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@section('footer')
    @include('system.coms.content-dialog')
@endsection